<div class="layui-form ul-form">
    {{# layui.each(d, function(index, item){ }}
    {{# if(item.type == 'text'){ }}
    <div class="layui-form-item">
        <label class="layui-form-label">{{item.title}}</label>
        <div class="layui-input-block">
            <input ul-name="insert" type="text" name="{{item.name}}" class="layui-input">
        </div>
    </div>
    {{# }else if(item.type == 'layedit'){ }}
    <div class="layui-form-item">
        <label class="layui-form-label">{{item.title}}</label>
        <div class="layui-input-block">
            <textarea layedit style="display: none" ul-name="insert" name="{{item.name}}"
                      class="layui-textarea"></textarea>
        </div>
    </div>
    {{# }else if(item.type == 'textarea'){ }}
    <div class="layui-form-item">
        <label class="layui-form-label">{{item.title}}</label>
        <div class="layui-input-block">
            <textarea textarea ul-name="insert" name="{{item.name}}" class="layui-textarea"></textarea>
        </div>
    </div>
    {{# }else if(item.type == 'time'){ }}
    <div class="layui-form-item">
        <label class="layui-form-label">{{item.title}}</label>
        <div class="layui-input-block">
            <input ul-type-name="time" ul-name="insert" type="text" name="{{item.name}}" class="layui-input">
        </div>
    </div>
    {{# }else if(item.type == 'select'){ }}
    <div class="layui-form-item">
        <label class="layui-form-label">{{item.title}}</label>
        <div class="layui-input-block">
            <select ul-name="insert" name="{{item.name}}">
                <option value=""></option>
                {{# layui.each(item.value, function(value_index, value_item){ }}
                {{# if(item.default == value_item.key){ }}
                <option selected value="{{value_item.key}}">{{value_item.value}}</option>
                {{# }else{ }}
                <option value="{{value_item.key}}">{{value_item.value}}</option>
                {{# } }}
                {{# }); }}
            </select>
        </div>
    </div>
    {{# } }}
    {{# }); }}
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button id="ul-insert-submit" class="layui-btn layui-btn-primary">立即添加</button>
        </div>
    </div>
</div>